package ecomm.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
//import com.example.e_comm.entity.Permision;
import ecomm.entity.Permission;

import java.util.List;
import java.util.Set;


public interface PermissionService extends IService<Permission> {

    /**
     * 分页查询权限
     *
     * @param page 分页参数
     * @return 符合条件的权限分页列表
     */
    List<Permission> getPermissionsByPage(Page<Permission> page);
    IPage<Permission> getPermissionsByPage(IPage<Permission> page, String keyword);
    List<Permission> getPermissionsByUserId(Long userId);
    List<Permission> getPermissionsByRoleId(Long roleId);

    Set<String> getPermissionsByUserId(Long userId, String separator);
    Set<String> getPermissionsByRoleId(Long roleId, String separator);
}